﻿<controls:ChildWindow x:Class="JuCloudy.Platform.Structure.UserControls.jErrorWindow"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:UserControls="clr-namespace:JuCloudy.Platform.UserControls;assembly=JuCloudy.Platform.UserControls"
           Width="480" Height="380" 
           Title="jErrorWindow" Closing="ChildWindow_Closing">

    <controls:ChildWindow.Resources>
        <ResourceDictionary Source="/JuCloudy.Platform.UserControls;component/Assets/jChildWindow.xaml"/>
    </controls:ChildWindow.Resources>

    <controls:ChildWindow.Style>
        <Style BasedOn="{StaticResource jErrorWindow}" TargetType="controls:ChildWindow"></Style>
    </controls:ChildWindow.Style>

    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid x:Name="_debugmode" Visibility="Collapsed">
            <ScrollViewer Margin="0,0,0,64" VerticalScrollBarVisibility="Auto" BorderBrush="{x:Null}" BorderThickness="0">
                <TextBox x:Name="_txt" BorderBrush="{x:Null}" BorderThickness="0" IsReadOnly="True" TextWrapping="Wrap" AcceptsReturn="True" Background="{x:Null}"></TextBox>
            </ScrollViewer>
            <Grid VerticalAlignment="Bottom" Height="64" Background="#FFF7F8FA">
                <Rectangle VerticalAlignment="Top" Height="1" Fill="#FFDBE7EF"/>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,15,0">
                    <UserControls:jButton x:Name="btn_close" Content="关闭" Width="75" Height="34" Margin="0,0,15,0" FontSize="14" Background="#FF339933" BorderBrush="#FF339933" Click="btn_close_Click"/>
                </StackPanel>
            </Grid>
        </Grid>
        <Grid x:Name="_releasemode">
            <TextBlock Text="非常抱歉，程序好像出了点小问题。我们已经收集了与此问题相关的信息，上报这些信息可以帮助我们重现问题并寻找解决方案。" FontSize="16" TextWrapping="Wrap"></TextBlock>
            <TextBlock Text="我们向您保证上报的信息中不存在任何个人隐私，并且我们也不会将您上报的信息给予第三方。" FontSize="16" TextWrapping="Wrap" Margin="0,50,0,0"></TextBlock>
            <Border Margin="10,105,10,75" BorderBrush="#BF1C9CDB" BorderThickness="2" Background="#191C9CDB">
                <Grid>
                    <TextBlock Text="您上报的信息中可能会包含以下内容：" FontSize="14"></TextBlock>
                    <Grid Margin="5,25,5,5">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition></ColumnDefinition>
                            <ColumnDefinition></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        
                        <StackPanel Grid.Column="0" Margin="0,0,5,0">
                            <TextBlock x:Name="txt_errormsg" Text="错误信息:" FontSize="13"></TextBlock>
                            <TextBlock x:Name="txt_userid" Text="用户ID:" FontSize="13"></TextBlock>
                            <TextBlock x:Name="txt_ipaddress" Text="IP地址:" FontSize="13"></TextBlock>
                            <TextBlock x:Name="txt_localdatetime" Text="本地时间:" FontSize="13"></TextBlock>
                            <TextBlock x:Name="txt_cookiesenable" Text="Cookie开关:" FontSize="13"></TextBlock>
                        </StackPanel>
                        <StackPanel Grid.Column="1" Margin="5,0,0,0">
                            <TextBlock x:Name="txt_broswertype" Text="浏览器内核:" FontSize="13"></TextBlock>
                            <TextBlock x:Name="txt_broswerversion" Text="浏览器内核版本:" FontSize="13"></TextBlock>
                            <TextBlock x:Name="txt_productname" Text="浏览器名称:" FontSize="13"></TextBlock>
                            <TextBlock x:Name="txt_productversion" Text="浏览器版本:" FontSize="13"></TextBlock>
                            <TextBlock x:Name="txt_platm" Text="运行平台:" FontSize="13"></TextBlock>
                        </StackPanel>
                    </Grid>
                </Grid>
            </Border>
            <Grid VerticalAlignment="Bottom" Height="64" Background="#FFF7F8FA">
                <Rectangle VerticalAlignment="Top" Height="1" Fill="#FFDBE7EF"/>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,15,0">
                    <UserControls:jButton x:Name="btn_submit" Content="上报至服务器并关闭此窗口" Width="200" Height="34" Margin="0,0,15,0" FontSize="14" Background="#FF339933" BorderBrush="#FF339933" Click="btn_submit_Click"/>
                    <UserControls:jButton Content="直接关闭此窗口" Width="120" Height="34" Margin="0,0,15,0" FontSize="14" BorderBrush="#FF339933" Click="jButton_Click"/>
                </StackPanel>
            </Grid>
        </Grid>
        
        <Grid x:Name="mask_loading" Background="#26000000" Visibility="Collapsed">
            <ProgressBar HorizontalAlignment="Center" Height="10" VerticalAlignment="Center" Width="100" IsIndeterminate="True"/>

        </Grid>
    </Grid>
</controls:ChildWindow>